<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程状态</td><td class="tv" id="state_name" colspan="3"></td></tr>
                <tr><td class="tt">经营类别</td><td class="tv" id="jinglei" colspan="3"></td></tr>
                <tr><td class="tt">工程名称</td><td class="tv" id="name"></td><td class="tt">工程编号</td><td class="tv" id="number"></td></tr>
                <tr><td class="tt">甲方名称</td><td class="tv" id="jiaer"></td><td class="tt">工程负责人</td><td class="tv" id="gofuer"></td></tr>
                <tr><td class="tt">所在地</td><td class="tv" id="areas"></td><td class="tt">详细地址</td><td class="tv" id="addr"></td></tr>
                <tr><td class="tt">投标单位</td><td class="tv" id="tou_unit_name"></td><td class="tt">业务归属</td><td class="tv" id="gui_unit_name"></td></tr>
                <tr><td class="tt">报备方式</td><td class="tv" id="lanshi_name"></td><td class="tt">资金来源</td><td class="tv" id="zilai_name"></td></tr>
                <tr><td class="tt">报名截止时间</td><td class="tv" id="enddt_bao"></td><td class="tt">投标截止时间</td><td class="tv" id="enddt_tou"></td></tr>
                <tr><td class="tt">资质要求</td><td class="tv" id="gongzi"></td><td class="tt">投标文件份数</td><td class="tv" id="tounums"></td></tr>
                <tr><td class="tt">招标方式</td><td class="tv" id="zhaotype_name"></td><td class="tt">招标代理公司</td><td class="tv" id="zhao_unit"></td></tr>
                <tr><td class="tt">工程控制价(元)</td><td class="tv" id="kongfee"></td><td class="tt">工期(天)</td><td class="tv" id="gongqi"></td></tr>
                <tr><td class="tt">投标保证金</td><td class="tv" id="toubaojin" colspan="3"></td></tr>
                <tr><td class="tt">经营备案人</td><td class="tv" id="jinger_name"></td><td class="tt">投标负责人</td><td class="tv" id="touer_name"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes">
            <div class="title">投标信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">投标时间</td><td class="tv" id="toudt"></td><td class="tt">投标价(元)</td><td class="tv" id="toufee"></td></tr>
                <tr><td class="tt">投标文件</td><td class="tv" id="bookinfo" colspan="3"></td></tr>
                <tr><td class="tt">开标时间</td><td class="tv" id="kaidt"></td><td class="tt">开标地点</td><td class="tv" id="kaiaddr"></td></tr>
                <tr><td class="tt">开标类型</td><td class="tv" id="kaitype_name"></td><td class="tt">工程发布平台</td><td class="tv" id="kailei_name"></td></tr>
                <tr><td class="tt">投标说明</td><td class="tv" id="toushuo" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div class="table-box tablenes layui-hide kaiinfo">
            <div class="title">开标信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">开标结果</td><td class="tv" id="state_jie" colspan="3"></td></tr>
                <tr class="layui-hide nozhong"><td class="tt">中标日期</td><td class="tv" id="windt"></td><td class="tt">中标价(元)</td><td class="tv" id="winfee"></td></tr>
                <tr><td class="tt">开标说明</td><td class="tv" id="kaishuo" colspan="3"></td></tr>
<!--                <tr class="layui-hide nozhong"><td class="tt">业绩是否录入平台</td><td class="tv" id="islu" colspan="3"></td></tr>-->
<!--                <tr class="layui-hide pinginfo"><td class="tt">项目经理</td><td class="tv" id="ren_xiang_name"></td><td class="tt">技术负责人</td><td class="tv" id="ren_ji_name"></td></tr>-->
<!--                <tr class="layui-hide pinginfo"><td class="tt">质量负责人</td><td class="tv" id="ren_zhi_name"></td><td class="tt">安全负责人</td><td class="tv" id="ren_an_name"></td></tr>-->
                </tbody>
            </table>
        </div>


        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_bid_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;


                $("#state_name").html(data.state_name);
                $("#jinglei").html(data.jinglei);
                $("#name").text(data.name);
                $("#number").text(data.number);
                $("#jiaer").text(data.jiaer);
                $("#gofuer").text(data.gofuer);
                $("#areas").text(data.areas);
                $("#addr").text(data.addr);
                $("#tou_unit_name").text(data.tou_unit_name);
                $("#gui_unit_name").text(data.gui_unit_name);
                $("#lanshi_name").text(data.lanshi_name);
                $("#zilai_name").text(data.zilai_name);
                $("#kaidt").text(data.kaidt);
                $("#kaiaddr").text(data.kaiaddr);
                $("#kaitype_name").text(data.kaitype_name);
                $("#kailei_name").text(data.kailei_name);
                $("#gongzi").text(data.gongzi);
                $("#tounums").text(data.tounums);
                $("#zhaotype_name").text(data.zhaotype_name);
                $("#zhao_unit").text(data.zhao_unit);
                $("#kongfee").text(parseFormatNum(data.kongfee));
                $("#gongqi").text(data.gongqi);
                $("#toubaojin").text(data.toubaojin);
                $("#enddt_bao").text(data.enddt_bao);
                $("#enddt_tou").text(data.enddt_tou);
                $("#jinger_name").text(data.jinger_name);
                $("#touer_name").text(data.touer_name);
                $("#explain").text(data.explain);


                $("#toudt").text(data.toudt);
                $("#toufee").text(data.toufee);
                $("#toushuo").text(data.toushuo);

                get_bidbook_info('bookinfo',res.data.bookinfo);

                if(data.state == 3){
                    $(".kaiinfo").removeClass('layui-hide');
                    $(".nozhong").removeClass('layui-hide');
                    $("#state_jie").html(data.state_name);
                    $("#windt").text(data.windt);
                    $("#winfee").text(data.winfee);
                    $("#kaishuo").text(data.kaishuo);
                    $("#islu").text(data.islu);
                    if(data.islu == '是'){
                        $(".pinginfo").removeClass('layui-hide');
                        get_zhiwei_info('ren_xiang_name',res.data.ren_xiang_info);
                        get_zhiwei_info('ren_ji_name',res.data.ren_ji_info);
                        get_zhiwei_info('ren_zhi_name',res.data.ren_zhi_info);
                        get_zhiwei_info('ren_an_name',res.data.ren_an_info);
                    }
                }
                if(data.state == 6){
                    $(".kaiinfo").removeClass('layui-hide');
                    $("#state_jie").html(data.state_name);
                    $("#kaishuo").text(data.kaishuo);
                }





                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('bid', param_id);
    });




    function get_zhiwei_info(dom, data) {
        var str = '';
        for(var key in data){
            if(str){
                str += '，<span onclick="get_cert_show('+data[key].id+')" class="colorlan">'+data[key].name+'</span>'
            }else{
                str += '<span onclick="get_cert_show('+data[key].id+')" class="colorlan">'+data[key].name+'</span>'
            }
        }
        $("#"+dom).html(str);
    }

    function get_cert_show(id) {
        openPage('../cert/show.php?id='+id);
    }



    function get_bidbook_info(dom, data) {
        var str = '';
        for(var key in data){
            if(str){
                str += '，<span onclick="get_bidbook_show('+data[key].id+')" class="colorlan">'+data[key].name+'</span>'
            }else{
                str += '<span onclick="get_bidbook_show('+data[key].id+')" class="colorlan">'+data[key].name+'</span>'
            }
        }
        $("#"+dom).html(str);
    }

    function get_bidbook_show(id) {
        openPage('../bid_book/show.php?id='+id);
    }
</script>
</body>
</html>




